<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>last class selector</title>
</head>

<body>
    <div class="new">
        <div class="noclass">
            xx
        </div>
        <div class="class">
            <div class="div">m</div>
            <div class="div">m</div>
        </div>
        <div class="class">
            <div class="div">m</div>
            <div class="div">m</div>
        </div>
        <div class="class">
            <div class="div">m</div>
            <div class="div">m</div>
        </div>
    </div>
    <style>
        .class:nth-of-type(1) {
            color: blue;
        }
    </style>
</body>

</html>